home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 97 / CD-ROM 97 / CD-ROM 97.iso / internet / ghostzilla / ghsetup.exe / chrome / comm.jar / content / editor / EditConflict.js < prev    next >
Encoding:
JavaScript  |  2002-04-09  |  1.4 KB  |  57 lines

  1. /* 
  2.  * The contents of this file are subject to the Netscape Public
  3.  * License Version 1.1 (the "License"); you may not use this file
  4.  * except in compliance with the License. You may obtain a copy of
  5.  * the License at http://www.mozilla.org/NPL/
  6.  *  
  7.  * Software distributed under the License is distributed on an "AS
  8.  * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  9.  * implied. See the License for the specific language governing
  10.  * rights and limitations under the License.
  11.  *  
  12.  * The Original Code is Mozilla Communicator client code, released
  13.  * March 31, 1998.
  14.  * 
  15.  * The Initial Developer of the Original Code is Netscape
  16.  * Communications Corporation. Portions created by Netscape are
  17.  * Copyright (C) 1998-1999 Netscape Communications Corporation. All
  18.  * Rights Reserved.
  19.  * 
  20.  * Contributor(s): 
  21.  */
  22.  
  23. // dialog initialization code
  24. function Startup()
  25. {
  26.   if (!InitEditorShell())
  27.     return;
  28.   
  29.   SetWindowLocation();
  30. }
  31.  
  32. function KeepCurrentPage()
  33. {
  34. dump("KeepCurrentPage\n");
  35.   // Simple close dialog and don't change current page
  36.   //TODO: Should we force saving of the current page?
  37.   SaveWindowLocation();
  38.   return true;
  39. }
  40.  
  41. function UseOtherPage()
  42. {
  43. dump("UseOtherPage\n");
  44.   // Reload the URL -- that will get other editor's contents
  45.   setTimeout("editorShell.LoadUrl(GetDocumentUrl())", 10);
  46.   SaveWindowLocation();
  47.   return true;
  48. }
  49.  
  50. function PreventCancel()
  51. {
  52.   SaveWindowLocation();
  53.  
  54.   // Don't let Esc key close the dialog!
  55.   return false;
  56. }
  57.